﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;

namespace PreeRegisterBLL.Security
{
    class MD5
    {
        public static string myMD5(string sText)
        {
            Byte[] clearBytes = Encoding.UTF8.GetBytes(sText);
            Byte[] hashedBytes = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
            string Result = BitConverter.ToString(hashedBytes).Replace("-","").ToLower();
            return Result;
        }

    }
}
